home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / Utilities / C / ASAP / unit_.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-09-09  |  1.8 KB  |  55 lines

  1. /*****************************************************************************
  2.  *                                                                           *
  3.  * ASAP - Amiga Software Authoring Platform                                  *
  4.  *                                                                           *
  5.  * Written by Laurie Perrin                                                  *
  6.  *                                                                           *
  7.  * AUnit wrapper class                                                       *
  8.  *                                                                           *
  9.  *****************************************************************************/
  10.  
  11. #ifndef ASAP_AUnit_H
  12. #define ASAP_AUnit_H
  13.  
  14. extern "C"
  15. {
  16.  #include <Proto/Disk.h>
  17. }
  18.  
  19. class AUnit
  20. {
  21.  public:
  22.  inline static BOOL AllocUnit(long unitNum);
  23.  inline static void FreeUnit(long unitNum);
  24.  inline static LONG GetUnitID(long unitNum);
  25.  inline static void GiveUnit();
  26.  inline static LONG ReadUnitID(long unitNum);
  27. };
  28. //----------------------------------------------------------------------------
  29. BOOL AUnit::AllocUnit (long unitNum)
  30. {
  31.  return ::AllocUnit(unitNum);
  32. }
  33. //----------------------------------------------------------------------------
  34. void AUnit::FreeUnit (long unitNum)
  35. {
  36.  ::FreeUnit(unitNum);
  37. }
  38. //----------------------------------------------------------------------------
  39. LONG AUnit::GetUnitID (long unitNum)
  40. {
  41.  return ::GetUnitID(unitNum);
  42. }
  43. //----------------------------------------------------------------------------
  44. void AUnit::GiveUnit ()
  45. {
  46.  ::GiveUnit();
  47. }
  48. //----------------------------------------------------------------------------
  49. LONG AUnit::ReadUnitID (long unitNum)
  50. {
  51.  return ::ReadUnitID(unitNum);
  52. }
  53.  
  54. #endif
  55.